<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>待批改考试 - 在线考试系统</title>
    <link href="/css/bootstrap.min.css" rel="stylesheet">
    <link rel="stylesheet" href="/css/all.min.css">
    <style>
        :root {
            --primary: #4361ee;
            --secondary: #3f37c9;
            --teacher-accent: #4361ee;
            --card-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
            --transition: all 0.3s ease;
        }

        body {
            font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
            background-color: #f5f7fb;
            color: #333;
            min-height: 100vh;
            display: flex;
            flex-direction: column;
        }

        .navbar {
            background: linear-gradient(135deg, var(--primary), var(--secondary));
            box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
            padding: 0.8rem 1rem;
        }

        .navbar-brand {
            font-weight: 700;
            font-size: 1.5rem;
            display: flex;
            align-items: center;
        }

        .navbar-brand i {
            margin-right: 10px;
            font-size: 1.8rem;
        }

        .nav-link {
            color: rgba(255, 255, 255, 0.85) !important;
            font-weight: 500;
            padding: 0.5rem 1rem !important;
            border-radius: 4px;
            margin: 0 3px;
            transition: var(--transition);
        }

        .nav-link:hover, .nav-link.active {
            background-color: rgba(255, 255, 255, 0.15);
            color: white !important;
        }

        .main-content {
            flex: 1;
            padding: 2rem 0;
        }

        .page-header {
            background: white;
            border-radius: 15px;
            padding: 1.5rem;
            box-shadow: var(--card-shadow);
            margin-bottom: 2rem;
            position: relative;
            overflow: hidden;
        }

        .page-header::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            width: 5px;
            height: 100%;
            background-color: var(--teacher-accent);
        }

        .page-title {
            font-weight: 700;
            margin-bottom: 0.5rem;
            color: var(--teacher-accent);
        }

        .page-subtitle {
            color: #6c757d;
            margin-bottom: 0;
        }

        .exam-card {
            background: white;
            border-radius: 15px;
            padding: 1.5rem;
            box-shadow: var(--card-shadow);
            margin-bottom: 1.5rem;
            transition: var(--transition);
            border-left: 5px solid var(--teacher-accent);
        }

        .exam-card:hover {
            transform: translateY(-2px);
            box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
        }

        .exam-title {
            font-weight: 700;
            margin-bottom: 0.5rem;
            color: var(--teacher-accent);
        }

        .exam-info {
            color: #6c757d;
            margin-bottom: 1rem;
        }

        .exam-info span {
            margin-right: 1rem;
        }

        .btn-review {
            background: linear-gradient(135deg, var(--teacher-accent), #3a0ca3);
            border: none;
            color: white;
            padding: 0.5rem 1.5rem;
            border-radius: 8px;
            font-weight: 600;
            transition: var(--transition);
        }

        .btn-review:hover {
            transform: translateY(-2px);
            box-shadow: 0 5px 15px rgba(67, 97, 238, 0.4);
            color: white;
        }

        .footer {
            background: linear-gradient(135deg, var(--primary), var(--secondary));
            color: white;
            padding: 2rem 0;
            margin-top: auto;
        }

        .footer-title {
            font-weight: 700;
            margin-bottom: 1rem;
            font-size: 1.25rem;
        }

        .footer-links {
            list-style: none;
            padding: 0;
        }

        .footer-links li {
            margin-bottom: 0.5rem;
        }

        .footer-links a {
            color: rgba(255, 255, 255, 0.8);
            text-decoration: none;
            transition: var(--transition);
        }

        .footer-links a:hover {
            color: white;
            text-decoration: underline;
        }

        .copyright {
            text-align: center;
            padding-top: 1.5rem;
            margin-top: 1.5rem;
            border-top: 1px solid rgba(255, 255, 255, 0.1);
            color: rgba(255, 255, 255, 0.7);
            font-size: 0.9rem;
        }

        .empty-state {
            text-align: center;
            padding: 3rem;
            color: #6c757d;
        }

        .empty-state i {
            font-size: 4rem;
            margin-bottom: 1rem;
            color: #dee2e6;
        }
    </style>
</head>
<body>
    <!-- 导航栏 -->
    <nav class="navbar navbar-expand-lg navbar-dark">
        <div class="container">
            <a class="navbar-brand" href="/teacher/home">
                <i class="fas fa-chalkboard-teacher"></i>在线考试系统
            </a>
            <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarNav">
                <span class="navbar-toggler-icon"></span>
            </button>
            <div class="collapse navbar-collapse" id="navbarNav">
                <ul class="navbar-nav me-auto">
                    <li class="nav-item">
                        <a class="nav-link" href="/home/manage"><i class="fas fa-home"></i> 主页</a>
                    </li>
                    <li class="nav-item">
                        <a class="nav-link" href="/exam/manage"><i class="fas fa-tasks"></i> 考试管理</a>
                    </li>
                    <li class="nav-item">
                        <a class="nav-link" href="/teacher/question/manage"><i class="fas fa-book"></i> 题库管理</a>
                    </li>
                    <li class="nav-item">
                        <a class="nav-link active" href="/exam/pending"><i class="fas fa-edit"></i> 待批改</a>
                    </li>
                </ul>

                <ul class="navbar-nav ms-auto">
                    <li class="nav-item">
                        <a class="nav-link" href="/teacher/profile">
                            <i class="fas fa-user-circle"></i> 个人信息
                        </a>
                    </li>
                    <li class="nav-item">
                        <a class="nav-link" href="/logout">
                            <i class="fas fa-sign-out-alt"></i> 退出登录
                        </a>
                    </li>
                </ul>
            </div>
        </div>
    </nav>

    <!-- 主内容区域 -->
    <div class="main-content">
        <div class="container">
            <div class="page-header">
                <h2 class="page-title"><i class="fas fa-edit me-2"></i>待批改考试</h2>
                <p class="page-subtitle">查看所有待批改的考试记录</p>
            </div>

            <div th:if="${#lists.isEmpty(pendingExams)}" class="empty-state">
                <i class="fas fa-clipboard-check"></i>
                <h4>暂无待批改考试</h4>
                <p>所有考试都已批改完成</p>
            </div>

            <div th:each="exam : ${pendingExams}" class="exam-card">
                <div class="row align-items-center">
                    <div class="col-md-8">
                        <h5 class="exam-title" th:text="${exam.examName}">考试名称</h5>
                        <div class="exam-info">
                            <span><i class="fas fa-user me-1"></i><span th:text="${exam.studentName}">学生姓名</span></span>
                            <span><i class="fas fa-book me-1"></i><span th:text="${exam.courseName}">课程名称</span></span>
                            <span><i class="fas fa-clock me-1"></i><span th:text="${#temporals.format(exam.submitTime, 'yyyy-MM-dd HH:mm')}">提交时间</span></span>
                        </div>
                    </div>
                    <div class="col-md-4 text-end">
                        <a th:href="@{'/exam/review/' + ${exam.recordId}}" class="btn btn-review">
                            <i class="fas fa-edit me-1"></i>开始批阅
                        </a>
                    </div>
                </div>
            </div>
        </div>
    </div>

<!-- 页脚 -->
<footer class="footer">
    <div class="container text-center py-4">
        <a href="https://gitee.com/sorrymaker04/onlineexam-workload" target="_blank"><i class="fab fa-github fa-2x"></i></a>
        <div class="copyright mt-2">
            &copy; 2025 版权所有 北城在线考试系统小组 12 Team
        </div>
    </div>
</footer>

    <script src="/js/bootstrap.bundle.min.js"></script>
</body>
</html> 